add -lm when linking against static yajl
(see isnan, isinf, etc in 3rdparty/yajl/src/yajl_gen.c)
check for tempfile success