Previously static builds were broken because
GenerateExportHeader used:
get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE)
which returns STATIC_LIBRARY, however since we had an
option of the same name that variable was "dobule expanded"
in if statements, breaking GenerateExportHeader's logic
Additionally remove the legacy style elseif(...) and endif(...) form
conditionals