kernel: fix suppressing -s for linking modules when profiling is enabled