Added Obj-C runtime workaround to handle optional methods