Use -fPIC when compiling shared modules. Reported by Steve Langasek aka vorlon.