Fixes missing method in case of old nodejs version.

Jira-issue: WP-1279