build: link against -lm manually.
context: use atomic int64 abstraction.
yajl: work around isinf not in -lm on Solaris 10.
build: allow libbson compilation on gcc 3.4

This might not work everywhere, but worth some experimentation now since
that is available on Solaris 10. Would be nice to have stuff working
there.