Update `getVersion` method

Using `require` is possible to dinamically get library version from
package.json `version` property.
Merge pull request #571 from potomak/feature/fix-version-method

Feature/fix version method