Fix GCC 4.8 warnings with unused local typedefs
Fix GCC 4.8 error with pthread linking
Optimize with -Ofast for Release