slightly rearrange prototype.h
support more compiler versions