Fixed Linux compilation and linking