busybox: Use 'gsed' in Mac builds

Mac builds were broken because its sed implementation is not compatible
with some of the features used in this script. We already require gsed
for the Android build on Mac so this changes the script to take that
into account.

Change-Id: I37c10f8c543bdaf2c84409dacfaeccd24eb152d7