Improve ADVANCED_OPTIMIZATION support and Mac Meta keys