Add convenience function to get size_t from object.d