Improve trick to check if variable is integer for Windows

msysgit was not that happy with what has been introduced previously, but
a trick with tr is working fine.