Use grep to check a regular expression.

[[ is a bash/zsh-ism that does not exist in the POSIX /bin/sh, and by
default, GNU make (perhaps others) uses /bin/sh as its shell.  On
systems where /bin/sh is a POSIX-compliant shell, the [[ test fails.

This addresses issue #243.