pass compile with xcode 6.2 beta3

This change avoid compile error on xcode 6.2 beta3 with a few minor changes.