Postgres module does not compile --without-threads
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1827
Reported by Fredrik Hubinette, Idonex hubbe@hubbe.net
Postgres module does use ifdefs and provided defines to NOT use mutexes when compiled --without-threads which causes it not to compile.