The reason why you have to declare this native in the map header, is because it is not in the function list. The function list contains functions of common.j and Blizzard.j. Some natives that are in common.ai are very useful, but you have to declare them in the map header before using them.
I recommend reading the documentation about native declaration:
JassHelper 0.A.0.0