hack autoconf stuff to work properly with dynmodules. doesnt work with modules though due to link flag not being set properly