Make luasandbox_version.h generation work on OS X

Fix-up for Ieec777485 on OS X, which has a sed that behaves very differently
from GNU's.

Change-Id: I3f008bb58d112120e9e1d3cddf7efb7fa6315561