make Linux version compile and link (segfaults/crashes still)