Build optimization flags fix