Suggested fix for issue #345 to avoid warnings

Catch Warning for non existing WeakRef-extension.