Fix compilation of optimized build