Workaround for jersey bug (see https://java.net/jira/browse/JERSEY-2335)