Wrapping some package openjdk-7-jdk installs in if !defined

Change-Id: I34e22d6258ee5df6fb59b3678f6af1089bc77525