os x port initial

compiling on Mavericks
1、add endian.h for OS X
2、sh-3.2 bulltin echo does not support '-n' option, fixed
3、fix the ldflags for ld64