Fixed compilation errors with reflection examples from programcreek.com