PM attacks 'dynastic parties', says social justice is BJP's core ideology