fix compile errors against rust nightly