Make sure that your module uses MODULE_DEPEND to note its dependency on altq. If altq is loaded as a module the kernel linker will only be able to resolve symbols from altq if your module uses MODULE_DEPEND properly.