add #warning

@ncannasse: Are you okay with adding #warning? This pull request also uses it to warn about haxeJSON deprecation.