Make docking gdl 3.4 compatible.

 * There are still some warnings but it doesn't seem there are any drawbacks.
   gdl 3.6 and higher still works fine.