bson: get format strings from inttypes.h

This needs to be abstracted as inttypes.h is a C99 feature. However, lets
get this working and then make it work where necessary.