Allow passing -so or -build_shared_libs to buildall

Default is to statically link, but specifying these flags will dynamically
link the executables.

Change-Id: Ic67a209b36285027e9b44e5fa491b197f443d84f
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3869
Reviewed-by: Marcel Kornacker <marcel@cloudera.com>
Tested-by: jenkins