Fix category dtype test for older pandas