Nucleobase synthesis in interstellar ices