apxs: fix handling of -Wc/-Wl and "-o mod_foo.so". PR: 31448 Obtained from: Submitted by: jorton Reviewed by: jorton, jerenkrantz, pquerna