skip some tests when cross-compiling

refactor the condition