Added extra static flags in attempt to remove dll dependency