more header changes for R v3 compatibility