Merge pull request #512 from bhariharan/unstable

Merge branch 'master' into unstable
Handling of longs / doubles
Merge pull request #518 from wmathurin/unstable

Handling of longs / doubles
Check API version before using the correct call