Added some needed system includes
Added some needed system includes

Added inclusion of priv
Added extern defs for used globals
Added getLongOptionName as utils

rcoscali/bootimg-tools,rcoscali/bootimg-tools