Fix compatibility with < API 19.