Added compatibility fix for Servlet 3.1