Fix a few compile errors on Lazarus-Win.