nitc: refactor MModule cflags and ldflags to support different target platforms