Update gitignores
Tweak build system to support static linking