add support for GCC 5: std::list::size() complexity is O(1)