Ammonium phosphate flame retardant