Fix Mac build
Fix Mac build

- Get rid of GNU-ism in sed usage
- Order flags for Mac's getopt
- Do not use linux ELF on non-Linux

Fix issue #10

ND-CSE-30151/elvm,ND-CSE-30151/elvm,shinh/elvm,shinh/elvm,shinh/elvm,shinh/elvm,ND-CSE-30151/elvm,shinh/elvm,shinh/elvm,shinh/elvm,shinh/elvm