Fix for #1609 

Adapt to new signature of get_inline_instances but also keep backwards compatibility with django 1.4