Fixed code example in README to comply with 2.0.x
Merge pull request #1274 from andreasrs/readme-fix

Fixed code example in README to comply with 2.0.x