configure: Add check_x86asm() helper function to simplify some expressions