Fix for tests broken by renaming of box.cjson -> require('json')
-rdynamic breaks old Darwin systems, use it only on FreeBSD

Fix Mac OS X Lion build by not adding -rdynamic by default.
Only use -rdynamic on Darwin (Konstantin Knizhnik's Mac).
Merge remote-tracking branch 'origin/sql-tests-fix'