Make weak usage optional

Currently weak does not compile on 0.11.5. This fix allows usage of dnode on 0.11 without having to wait for weak to be fixed.