Added workaround for https://java.net/jira/browse/JERSEY-2038