Properly link files on multiple OSs