Added optimization, threading and RTS options to builds.