19
EDIT: As pointed by Stefan H. in his comment, the solution I have suggested only works if $X$ is normal, since I am using Tietze extension theorem. Perhaps I have overlooked something and I will be blushing, but I will give it a try. (This is my solution, I did not check the books I mentioned...