Alkylation of ambident salts of 4-hydroxypyrimidine derivatives