Add support for both ARC and non-ARC environments