Added some support for detecting the system and setting appropriate shared
library compilation options