add _getInstallDate() to reduce complexity

This patch add _getInstallDate() to avoid the line used before to collect $installDate.

the encodeFromRegistry was not required since installDate
is a numerical value.

I also added two tests to be sure value are define, hopefuly, this
will fix #1813.

see: #1813