Fixed Z vs \0 hack
Added isfinite for non-C99
Extracted bon_r_key to own function
Minor fixes
Fixed compilator flags for non-clang