Made changes for this to compile on Linux.