fixed some implicit declarations reported by Stanislav Brabec