Fix linker errors on Linux.
Fix compiler warnings on Linux.