Fix code to support Mono on Linux.