Adding z linker flag to get around weird linker errors