Update building on FreeBSD

Fix building in 64 bit mode, fix building WelsThreadLib.