Fix linker errors in debug mode on Linux