Revert "Temporary hack to workaround optim build issue on Mac (clang)"

This reverts commit 2fb9cac027f3582d499f0b6fa85093c3e4261e0c.