Add specs for Module#extend_object when given a frozen object

This is a missing spec for #2399 fixes.