Fixed compilation for bug 514280
Added weak reference interface