Lyapunov Equations with Positive Definite Solutions for Continuous- and Discrete-time Descriptor Systems