fix value initialization across goto.
fix tests for interface change.
Merge pull request #24 from rydotyosh/fixBuildForMac_PR

Fix build for mac