Default GS4 VS LG G2 with custom roms

I think of getting the GS4 or the LG G2, but I think of installing AOSP roms on the device I will buy.

I know the G2 probably wins in terms of out of the box device, but which one is better in terms of customs roms?

I know that the GS4 is more friendly for developers than the G2 and therefore most of its useful features can be used in custom roms..
Samsung Galaxy Nexus
Samsung Galaxy Tab 10.1
LG Optimus One P500 (Not in use)
iPhone, pay more for less.