Make expr more POSIXy

Change-Id: I939cf1f227c14112656804d69c1afd7ead4a31ed
diff --git a/tools/apicheck/etc/apicheck b/tools/apicheck/etc/apicheck
index 9c00e25..5d0480c 100644
--- a/tools/apicheck/etc/apicheck
+++ b/tools/apicheck/etc/apicheck
@@ -38,7 +38,7 @@
 
 javaOpts=""
 while expr "x$1" : 'x-J' >/dev/null; do
-    opt=`expr "$1" : '-J\(.*\)'`
+    opt=`expr "x$1" : 'x-J\(.*\)'`
     javaOpts="${javaOpts} -${opt}"
     shift
 done