set EXPR_COMPAT=1 if running inside freebsd so shFlags works correctly

Signed-off-by: Vincent Driessen <vincent@3rdcloud.com>
diff --git a/git-flow b/git-flow
index a03ba1f..93e9f0f 100755
--- a/git-flow
+++ b/git-flow
@@ -37,6 +37,9 @@
 # policies, either expressed or implied, of Vincent Driessen.
 #
 
+# set this to workaround expr problems in shFlags on freebsd
+if uname -s | egrep -iq 'bsd'; then export EXPR_COMPAT=1; fi
+
 # enable debug mode
 if [ "$DEBUG" = "yes" ]; then
 	set -x