Segfault with pd.tslib.get_period_field FIX

closes #4519