Fix cross build when CFLAGS contains cross compilation flags.