linker options -lstdc++ -lm added for FreeBSD